usbuart6 2.2.0
Loading...
Searching...
No Matches
main.c File Reference

USB UART 6 Click Example. More...

#include "board.h"
#include "log.h"
#include "usbuart6.h"

Macros

#define PROCESS_BUFFER_SIZE   200

Functions

void application_init (void)
void application_task (void)
int main (void)

Detailed Description

USB UART 6 Click Example.

Description

This example demonstrates the USB UART 6 Click board's ability to act as a USB-to-UART bridge. It enables bidirectional communication between a USB host and a UART device by forwarding received data between the USB and UART interfaces.

The demo application is composed of two sections :

Application Init

Initializes the logger and the Click board and enables the device.

Application Task

Continuously reads the data from one UART interface and forwards it to the other, enabling seamless USB to UART data transfer and vice versa.

Note
Make sure the USB UART 6 Click is properly connected to a USB host and the mikroBUS socket, and that both UART interfaces are configured for the same baud rate.
Author
Stefan Filipovic

Macro Definition Documentation

◆ PROCESS_BUFFER_SIZE

#define PROCESS_BUFFER_SIZE   200

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

< Click config object.

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ main()

int main ( void )